#!/bin/bash

args=(

    # 尤其当心mac地址冲突
        -device virtio-net-pci,netdev=net0,mac=50:00:00:02:00:00
        -netdev tap,id=net0,ifname=ar1_0,script=no

        -device virtio-net-pci,netdev=net1,mac=50:00:00:02:00:01
        -netdev tap,id=net1,ifname=ar1_1,script=no

        -device virtio-net-pci,netdev=net2,mac=50:00:00:02:00:02
        -netdev tap,id=net2,ifname=ar1_2,script=no

        -device virtio-net-pci,netdev=net3,mac=50:00:00:02:00:03
        -netdev tap,id=net3,ifname=ar1_3,script=no

        -device virtio-net-pci,netdev=net4,mac=50:00:00:02:00:04
        -netdev tap,id=net4,ifname=ar1_4,script=no

        -device virtio-net-pci,netdev=net5,mac=50:00:00:02:00:05
        -netdev tap,id=net5,ifname=ar1_5,script=no

        # 这个路由器镜像是我自己下载的，不是来在eve懒人整合包
        -drive file=./firmware/Cdisk.qcow2,if=virtio,bus=0,unit=0,cache=none \

        )

# 控制台账号 super 密码 super
#/opt/qemu-2.12.0/bin/
qemu-system-x86_64 -nographic \
        -smp 1 -m 2048 -name AR1000v -uuid 6d51adc0-0cd5-4f58-bf18-ffed3ff7e7e7 \
        -machine type=pc,accel=kvm -vga std -usbdevice tablet -boot order=cd -cpu host,vmx=off,svm=off \
        ${args[@]}
